package com.haizhi.crm.api.controller.sys.auth;

import com.haizhi.crm.common.model.Response;
import com.haizhi.crm.sys.auth.model.DepartmentQo;
import com.haizhi.crm.sys.auth.service.DepartmentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * Created by yangyijun on 2018/5/17.
 */
@Api(description = "[系统-部门]" )
@RestController
@RequestMapping("/auth/department" )
public class DepartmentController {

    @Autowired
    private DepartmentService departmentService;

    @PostMapping("/import" )
    @ApiOperation(value = "行内部门信息表数据导入接口" )
    public Response save(@RequestBody @Valid DepartmentQo departmentQo) {
        return departmentService.save(departmentQo);
    }

}
